package com.wwl.cms.utils.designModeTest.builder;

/**
 * @author wwl
 * @version 1.0
 * @date 2021/9/5 23:03
 * @description:建造者模式
 */
public class Client {
    public static void main(String[] args) {
        //盖普通房子
        CommonHouse commonHouse = new CommonHouse();
        //commonHouse.build();
        //准备创建房子的指挥者
        HouseDirector houseDirector = new HouseDirector(commonHouse);
        //完成盖房子，返回产品
        House house = houseDirector.constructHouse();

        //盖普通房子
        HighBuilding highBuilding = new HighBuilding();
        //commonHouse.build();
        //准备创建房子的指挥者
        HouseDirector houseDirector1 = new HouseDirector(highBuilding);
        //完成盖房子，返回产品
        House house2 = houseDirector1.constructHouse();
    }
}
